import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const Layout = () => import('@/views/Layout')
const Home = () => import('@/views/Home')
const play = () => import('@/views/Play')
const Search = () => import('@/views/Search')
const routes = [
  {
    path: '/Layout',
    name: 'Layout',
    component: Layout,
    children: [
      {
        path: 'Home',
        name: 'Home',
        component: Home,
        meta: { title: '🚗首页🚗' }
      },
      {
        path: 'Search',
        name: 'Search',
        component: Search,
        meta: { title: '🔎搜索🔍' }
      }
    ]
  },
  {
    path: '/play',
    name: 'play',
    component: play
  }
]

const router = new VueRouter({
  routes
})

export default router
